package com.cos.eureka.config;

import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * @author: COS
 * @time: 2022/4/27 15:40
 * @description:
 */
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        //放行/eureka/**的所有请求
        http.csrf().ignoringAntMatchers("/eureka/**");
        super.configure(http);
    }
}
